
/**
	单一系统用户单选树	
**/
function singleuserinforadiotree(dataBaseId){
	$.ajaxSetup({
		  async: false
		  }); 
	  	var userid="",usernametext="";
		var tree;
		var root;
	 	var Tree = Ext.tree;
	    var url = Ext.get('basePath').getValue()+"tjsinfo/tjsoa/system/selectUserTree.do?method=getuserradio";
		var load = new Ext.tree.TreeLoader({
		 	dataUrl:url
		});
		root = new Tree.AsyncTreeNode({
			
			text:'天津利达粮油有限公司',
			id:0,
			draggable:false
		});
	    tree = new Ext.tree.TreePanel({
			autoScroll:true, 
			onlyLeafCheckable: false,
			containerScroll:true,
			height: 400,     
		    loader:load,
		    border:true,
		    x:0,
		    y:0,
		    anchor:"100% 100%",
		    root: root
	    });
	    
	    tree.on("click",function(node){
	    	if(node.attributes.isdepartment != true){
	    		usernametext = node.text;
	    		userid = node.id;
	    		win.fireEvent("winsubmint",{"usernametext":usernametext,"userid":userid});
	    	}
	    	
	    });
	    			  	   
	   var win = new Ext.Window({
			layout:"absolute",
			title:'人员选择',
			width:600,
			height:400,
			modal:true,
			items:[tree]
		});
		win.addEvents("winsubmint");
		win.on("show",function(){
			tree.expand(true,true);
		});	
	    return win;
	}	